<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"   
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core">
	
    <body>
	    <ui:composition>
	    		<div class="menuButton">
	    			
	    		</div>
				<div class="menuButton">
					<p:commandButton value="Dodaj pacjenta" icon="ui-icon-plus" rendered="#{loginBean.login}" action="/pages/patient/editPatient?faces-redirect=true"/>
				</div>
				<c:if test="#{!loginBean.loginUser.accType.personel}">
					<div class="menuButton">
						<p:commandButton value="Moi pacjenci" icon="ui-icon-clipboard" 
							rendered="#{loginBean.login}" action="/pages/patientStart?faces-redirect=true"/>
					</div>
					<div class="menuButton">
						<p:commandButton value="Moje wizyty" icon="ui-icon-clipboard" 
							rendered="#{loginBean.loginUser.doctor}" action="/pages/doctor/ourVisits?faces-redirect=true"/>
					</div>
					<div class="menuButton">
						<p:commandButton value="Moje wizyty" icon="ui-icon-clipboard" 
							rendered="#{loginBean.login}" action="/pages/patient/ourVisits?faces-redirect=true"/>
					</div>
					<div class="menuButton">
						<p:commandButton value="Ustawienia powiadomień" icon="ui-icon-clipboard" 
							rendered="#{!loginBean.loginUser.doctor and loginBean.login}" action="/pages/patient/settings?faces-redirect=true"/>
					</div>
				</c:if>
				<c:if test="#{loginBean.loginUser.accType.personel}">
					<div class="menuButton">
						<p:commandButton value="Pacjenci" icon="ui-icon-clipboard" action="/pages/patients?faces-redirect=true"/>
					</div>
				</c:if>
				<c:if test="#{loginBean.loginUser.accType.personel}">
					<div class="menuButton">
						<p:commandButton value="Zarzadzanie personelem" icon="ui-icon-gear" action="/pages/manager/manageDoctors?faces-redirect=true"/>
					</div>
				</c:if>
				<c:if test="#{loginBean.loginUser.accType.personel}">
					<div class="menuButton">
						<p:commandButton value="Dodaj doktora" icon="ui-icon-plus" action="/pages/doctor/editDoctor?faces-redirect=true"/>
					</div>
					<div class="menuButton">
						<p:commandButton value="Użytkownicy" icon="ui-icon-list" action="/pages/manager/users?faces-redirect=true"/>
					</div>
				</c:if>
				<div class="menuButton">
					<p:commandButton value="Statystyki" rendered="false" icon="ui-icon-gear" action="#{loginBean.logStats}"/>
				</div>
				
				<div class="menuButton">
					<p:commandButton value="generateRandomUsers" rendered="false" icon="ui-icon-gear" action="#{userMBean.generateRandomUsers}"/>
				</div>
				<div class="menuButton">
					<p:commandButton value="przypisz do wizyt" rendered="false" icon="ui-icon-gear" action="#{userMBean.bookVisits}"/>
				</div>
				
	    </ui:composition>
    </body>
</html>